/**
 * This work is licensed under a GNU General Public License 
 * (http://www.gnu.org/copyleft/gpl.html).
 * 
 * Title: 		Mobup
 * Version: 		0.3
 * Description:         Mobile uploader for Flickr
 * Creator:             Vincenzo Lembo and Matteo Penzo
 * Source:              http://mobup.org
 *
 */

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;


public class MessageBox {
    
    /*** Creates a new instance of MessageBox */
    public MessageBox() {
    }
    
    /**
     * Display the alert message box waiting fot the user to press the OK key
     */
    public static void Show(MIDlet midlet,String title,String msg,AlertType type)
    {
        Alert alert = new Alert(title,msg, null,type);
        alert.setTimeout(Alert.FOREVER);
        Display.getDisplay(midlet).setCurrent(alert);
    }
    
    /**
     * Display the alert message box for specified milliseconds 
     */
    public static void Show(MIDlet midlet,String title,String msg,AlertType type,int mills)
    {
        Alert alert = new Alert(title,msg, null,type);
        alert.setTimeout(mills);
        Display.getDisplay(midlet).setCurrent(alert);
        
    }
    
}
